package com.hqully.labmanage.domain.dto;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;

import lombok.Data;

/**
 * [User]DTO
 *
 * @author hqully
 * @date 2022-10-08 10:16:01
 */
@ApiModel(description = "")
@Data
public class UserDTO implements Serializable {

    private static final long serialVersionUID = 245044845313910156L;
    
    /**
     * 用户id
     */
    @ApiModelProperty("用户id")
    @NotNull(message = "用户id不能为空")
    private Long id;
    
    /**
     * 用户名
     */
    @ApiModelProperty("用户名")
    @NotBlank(message = "用户名不能为空")
    @Length(max = 20, message = "用户名长度不能超过20")
    private String username;
    
    /**
     * 密码
     */
    @ApiModelProperty("密码")
    @NotBlank(message = "密码不能为空")
    @Length(max = 20, message = "密码长度不能超过20")
    private String password;
    
    /**
     * 密码盐值
     */
    @ApiModelProperty("密码盐值")
    private String salt;
    
    /**
     * 角色id
     */
    @ApiModelProperty("角色id")
    @NotNull(message = "角色id不能为空")
    private Long roleId;
    

}

